<?php 
	
	session_start();
	if(empty($_SESSION['user_name'])) {
		header("Location: index.php");
	}

	if(isset($_GET['logout'])){
		session_destroy();
		header("Location:index.php");
	}

	echo "<a href='page.php?logout'><b>Logout</b></a>";
	echo "<div align='center'>Login successfully</div>";

?>